{% extends 'home/layout.html' %}
{% block content %}
    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title"><span class="glyphicon glyphicon-log-in"></span>&nbsp;会员登录</h3>
                </div>
                <div class="panel-body">
                    {% include 'home/flash_msg.html' %}
                    <form role="form" method="post">
                        <fieldset>
                            <div class="form-group">
                                <label for="input_contact"><span class="glyphicon glyphicon-user"></span>&nbsp;账号</label>
                                <input id="input_contact" class="form-control input-lg" placeholder="用户名" name="name" type="text" autofocus  value="{{form.data['name']|default('',True)}}">
                            </div>
                            {% for err in form.name.errors %}
                        <div class="col-md-12">
                            <span style="color:red">{{ err }}</span>
                        </div>
                        {% endfor %}
                            <div class="form-group">
                                <label for="input_password"><span class="glyphicon glyphicon-lock"></span>&nbsp;密码</label>
                                <input id="input_password" class="form-control input-lg" placeholder="密码" name="pwd" type="password" value="">
                            </div>
                            {% for err in form.pwd.errors %}
                        <div class="col-md-12">
                            <span style="color:red">{{ err }}</span>
                        </div>
                        {% endfor %}
                            {{ form.csrf_token }}
                             <button type="submit" class="btn btn-lg btn-success btn-block">登陆</button>
                        </fieldset>
                    </form>
                </div>
            </div>
        </div>
    </div>
{% endblock %}